
import {observable,action} from "mobx"
import { ajax } from "../api"

class UserList{
    @observable allList=[]

    @action getAllList=(keyword,cb)=>{
        ajax.getuserlist({keyword:keyword}).then(res=>{
            if(res.code==200){
                this.allList=res.result
            }
            cb&&cb()
        })
    }

    @action changeAllList=(payload)=>{
        this.allList=payload
    }
}

export default new UserList()